package com.tran.app.repository

import com.tran.app.MyApp
import com.tran.app.dao.AppDatabase
import com.tran.app.dao.PlainDataDao
import com.tran.app.dao.UserPlaneDao
import com.tran.app.data.PlainData
import com.tran.app.data.Teacher
import com.tran.app.data.UserPlane
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.withContext

interface UserPlaneRepository {
    fun getUserPlane(id:String): Flow<List<PlainData?>>
}

class UserPlaneRepositoryImpl(private val dao: PlainDataDao) : UserPlaneRepository {
    override fun getUserPlane(id:String): Flow<List<PlainData?>> {
        return dao.getPlainDataByUser(id)
    }
}
